import {Link} from 'react-router-dom';
// searchparams接收参数
// import { useSearchParams } from 'react-router-dom';
// params接收参数
import { useParams } from 'react-router-dom';
const Article = () =>{
    //接收参数
    // const [params] = useSearchParams()
    // const id = params.get('id')
    // const name = params.get('name')
    // console.log(id,name)
    // console.log(params)
    //接收params参数
    const params = useParams()
    const id  = params.id
    console.log(id,'params传参')
    return (
    <div>
    我是文章页1111
    <Link to='/login'>登录页</Link>
    </div>
    )
}

export default Article;